package com.building18.service.impl;

import com.building18.mapper.HouseMapper;
import com.building18.pojo.House;
import com.building18.pojo.dto.HouseDTO;
import com.building18.pojo.vo.HouseVO;
import com.building18.pojo.vo.StateVO;
import com.building18.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {
    @Autowired
    private HouseMapper houseMapper;

    @Override
    public List<HouseVO> getHouseNoAndId() {
       return houseMapper.getHouseNoAndId();
    }

    @Override
    public List<House> selectHouse(HouseDTO houseDTO) {
        return houseMapper.selectHouse(houseDTO);
    }

    @Override
    public List<StateVO> getHouseStateNameAndId() {
        return houseMapper.getHouseStateNameAndId();
    }

    @Override
    public Integer addHouse(House house) {
        return houseMapper.addHouse(house);
    }

    @Override
    public Integer deleteHouse(Integer id) {
        return houseMapper.deleteHouse(id);
    }

    @Override
    public Integer updateHouse(House house) {
        return houseMapper.updateHouse(house);
    }
}
